import { stringify } from 'qs';
import request from '@/utils/request';

/**
 *
 * @xzh {告警列表接口}
 */
export async function getCompletedData(params){
    let url = `/iot/workflow/v1/workflow/tasklist-history`
    return request(url, {
      method: 'POST',
      body: {
        ...params
      },
    });
}

//告警详情
// export async function getDetail(params) {
// 	return request(`/iot/workflow/v1/workflow/tasklist-complete/${params.taskId}`, {
// 		method: 'get'
// 	})
// }

//动态记录
export async function getEventLog(params) {
	return request('/iot/dmp/v1/taskLog/list', {
		method: 'POST',
		body: {
			...params
		}
	})
} 

//流程图
export async function getWorkflow(params) {
	const url = `/iot/workflow/v1/workflow/generateImage/${params.process_instance_id}`;
	//console.log(params)
	return request(url, {
	  reuqestImage :true,
	  method: 'get'
	})
}